using System;
using System.Collections.Generic;
namespace MicroMsg.Common.Utils
{
	public class ShowObjectInMemory
	{
		private const string TAG = "ShowObjectInMemory";
		public static Dictionary<string, int> sDictMemoryRecord = new Dictionary<string, int>();
		~ShowObjectInMemory()
		{
		}
		public static void AddOneObjectRecord(object object_0)
		{
		}
		public static void RemoveOneObjectRecord(object object_0)
		{
		}
		public static string ShowAllObjectInMemory()
		{
			string text = "";
			lock (ShowObjectInMemory.sDictMemoryRecord)
			{
				using (Dictionary<string, int>.KeyCollection.Enumerator enumerator = ShowObjectInMemory.sDictMemoryRecord.get_Keys().GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						string current = enumerator.get_Current();
						string[] array = current.Split(new string[]
						{
							"."
						}, 1);
						string text2 = "";
						for (int i = 1; i < array.Length; i++)
						{
							if (i != 1)
							{
								text2 += ".";
							}
							text2 += array[i];
						}
						object obj = text;
						text = string.Concat(new object[]
						{
							obj,
							text2,
							" count = ",
							ShowObjectInMemory.sDictMemoryRecord.get_Item(current),
							"\n"
						});
					}
				}
			}
			return text;
		}
		public static string ShowOneTypeInMemory(string strType)
		{
			string text = "";
			lock (ShowObjectInMemory.sDictMemoryRecord)
			{
				if (ShowObjectInMemory.sDictMemoryRecord.ContainsKey(strType))
				{
					string[] array = strType.Split(new string[]
					{
						"."
					}, 1);
					string text2 = "";
					for (int i = 1; i < array.Length; i++)
					{
						if (i != 1)
						{
							text2 += ".";
						}
						text2 += array[i];
					}
					object obj = text;
					text = string.Concat(new object[]
					{
						obj,
						text2,
						" count=",
						ShowObjectInMemory.sDictMemoryRecord.get_Item(strType)
					});
				}
			}
			return text;
		}
	}
}
